package com.atguigu.gulimall.member.config;

import com.atguigu.gulimall.member.interceptor.LoginInterCeptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

public class MemberMvcConfig implements WebMvcConfigurer {

     @Autowired
    LoginInterCeptor loginInterCeptor;


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginInterCeptor).addPathPatterns("/**");
    }
}
